package com.unbox.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * <菜单管理实体类
 * </p>
 *
 * @author 王振宇
 * @since 2021-03-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("unbox_menu")
@ApiModel(value = "Menu", description = "菜单管理")
public class Menu implements Serializable {
    private static final long serialVersionUID = 1L;
   /**
    * 标识列
    */
    @TableId(value = "menu_id", type = IdType.AUTO)
    @ApiModelProperty(value = "标识列", name = "menuId")
    private Integer menuId;

   /**
    * 验证
    */
    @TableField(value = "auth")
    @ApiModelProperty(value = "验证", name = "auth")
    private Boolean auth;

   /**
    * 组建路径
    */
    @TableField(value = "component")
    @ApiModelProperty(value = "组建路径", name = "component")
    private String component;

   /**
    * 创建时间
    */
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", name = "createTime")
    private LocalDateTime createTime;

   /**
    * 是否显示
    */
    @TableField(value = "hidden")
    @ApiModelProperty(value = "是否显示", name = "hidden")
    private Boolean hidden;

   /**
    * 图标
    */
    @TableField(value = "icon")
    @ApiModelProperty(value = "图标", name = "icon")
    private String icon;

   /**
    * 访问路径
    */
    @TableField(value = "path")
    @ApiModelProperty(value = "访问路径", name = "path")
    private String path;

   /**
    * 父级目录
    */
    @TableField(value = "pid")
    @ApiModelProperty(value = "父级目录", name = "pid")
    private Integer pid;

   /**
    *
    */
    @TableField(value = "quth")
    @ApiModelProperty(value = "", name = "quth")
    private Boolean quth;

   /**
    * 名称
    */
    @TableField(value = "title")
    @ApiModelProperty(value = "名称", name = "title")
    private String title;

   /**
    * 目录类型
    */
    @TableField(value = "type")
    @ApiModelProperty(value = "目录类型", name = "type")
    private Integer type;

   /**
    * 组件名称
    */
    @TableField(value = "name")
    @ApiModelProperty(value = "组件名称", name = "name")
    private String name;

    /**
     *
     */
    @TableField(value = "jurisdiction")
    @ApiModelProperty(value = "权限", name = "jurisdiction")
    private String jurisdiction;

    /**
     * 显示位置
     */
    @TableField(value = "location")
    @ApiModelProperty(value = "位置", name = "location")
    private String location;

    /**
     * 显示层级
     */
    @TableField(exist = false)
    private Integer layer = 3;

    /**
     * 子列表
     */
    @TableField(exist = false)
    private List<Menu> children = new ArrayList<>();
}
